﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContactsManage.aspx.cs" Inherits="Business_Cisoft3G_ContactsManage_ContactsManage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>联系人管理</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/style_ts.css" rel="stylesheet" type="text/css" />
    <asp:Literal ID="ltScript" runat="server"></asp:Literal>

    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
        #tallContent h1
        {
            margin: 15px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
    </asp:ScriptManager>
    
   <%-- <asp:UpdatePanel runat="server" ID="UpdatePanel1">
        <ContentTemplate>
        --%>
      
    
    <!--第一行-->
    <div class="position_list">
        <div class="position_left_list">
        </div>
        <div class="position_con_list">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="30">
                        <img src="../../../Images/3G/icon21.gif" width="14" height="14" alt="" />
                    </td>
                    <td class="cyan12">
                       通讯录管理
                    </td>
                </tr>
            </table>
        </div>
        <div class="position_right_list">
        </div>
    </div>
    <!--系统温馨提示栏-->
    <div class="search_list">
        <div class="search_top_list">
            <div class="search_topleft_list">
            </div>
            <!--  查询     -->
            <div class="search_topbg_list">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="30" align="left" valign="middle" style="padding-top: 4px;">
                            <img src="../../../Images/3G/icon_logo.gif" width="22" height="22" alt="" />
                        </td>
                        <td width="100" class="cyan13_bold" style="padding-top: 5px;">
                            系统温馨提示栏
                        </td>
                        <td style="padding-top: 5px;">
                            &nbsp;&nbsp;&nbsp;
                            <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
                                ControlToValidate="txtPhone" ErrorMessage="请输入正确的电话号码！" ValidationExpression="(\(\d{1,3|4}\)|\d{1,3|4}-)?\d{,8}"></asp:RegularExpressionValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic"
                                ControlToValidate="txtMobile" ErrorMessage="请输入正确的手机号码！" ValidationExpression="^\d{1,11}$"></asp:RegularExpressionValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" Display="Dynamic"
                                ControlToValidate="txtQQ" ErrorMessage="请输入正确的QQ号码！" ValidationExpression="^\d{1,11}$"></asp:RegularExpressionValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" Display="Dynamic"
                                ControlToValidate="txtPostCode" ErrorMessage="请输入正确的邮政编码！" ValidationExpression="\d{1,6}"></asp:RegularExpressionValidator>--%>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="search_topright_list">
            </div>
        </div>
    </div>
    <!--   查询条件和数据列表    -->
    <div class="index_search_con_list">
        <!--   查询条件    -->
        <table border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px; line-height: 23px; line-height:10px;">
            <tr>
                <td>
                    <span style="color: #ffffff; font-weight: normal">搜索：</span>
                    <asp:TextBox ID="txtSearchOption" runat="server" Style="height: 16px; width: 120px; border: 1px solid #ffffff;"></asp:TextBox>       
                    <span style="color: #ffffff; font-weight: normal">查询选项：</span>
                    <asp:DropDownList ID="ddlSearchOption" runat="server" Style="height: 20px;">
                        <asp:ListItem Value="CT_Name" Text="姓名" />
                        <asp:ListItem Value="CT_Mobile" Text="手机号码" />
                        <asp:ListItem Value="CT_Company" Text="单位名称" />
                    </asp:DropDownList>
                    <span style="color: #ffffff; font-weight: normal">通讯组：</span>
                    <asp:DropDownList ID="ddl_ContactGroup" runat="server" Style="height: 20px;">
                    </asp:DropDownList>
                    <asp:Button ID="btnSearch" runat="server" Text="" OnClick="btnSearch_Click" />
                    <br />
                    <asp:Button ID="btnAdd" runat="server" Text="" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnDelete" runat="server" Text="" OnClick="LinkButton2_Click" OnClientClick="if(CheckCheckBoxIsChecked(this)){document.getElementById('hihDelete').value = 'true';}else{document.getElementById('hihDelete').value = 'false';}" />
                    <asp:Button ID="btnImport" runat="server" Text="" OnClick="btnImport_Click" Visible="true" />
                    <asp:Button ID="btnExportThisPage" runat="server" ToolTip="导出本页记录" Text="" OnClick="btnExportThisPage_Click" />
                    <asp:Button ID="btnExportFilter" runat="server" Text="" ToolTip="导出筛选记录" OnClick="btnExportFilter_Click" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="true" 
            onrowdatabound="gvData_RowDataBound">
        </asp:GridView>
        <br />
        <!--数据列表-->
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="73798f" 
            id="table1">
            <tr class="cyan12" bgcolor="#1E3541">
                <td width="25" height="20" valign="middle" style="text-align: center">
                    <asp:CheckBox ID="chcAll" runat="server" />
                </td>
                <%--                <td style="display: none;">
                </td>
                <td style="display: none;">
                </td>--%>
                <td width="50" align="center" valign="middle">
                    姓名
                </td>
                <td align="center" valign="middle" width="70">
                    电话号码
                </td>
                <td width="70" align="center" valign="middle">
                    手机号码
                </td>
                <td width="70" align="center" valign="middle">
                    QQ
                </td>
                <td align="center" valign="middle">
                    单位
                </td>
                <td width="55" align="center" valign="middle">
                    部门
                </td>
                <td width="55" align="center" valign="middle">
                    职务
                </td>
                <td align="center" valign="middle">
                    联系人组
                </td>
                <td align="center" valign="middle" width="70">
                    操作
                </td>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand"
                OnItemDataBound="Repeater1_ItemDataBound">
                <ItemTemplate>
                    <tr bgcolor="#1E3541" onmousemove="this.className='li_td_mouseover'" onmouseout="this.className='li_td_mouseout'">
                        <td height="20" align="center" valign="middle">
                            <asp:CheckBox ID="cbk_single" runat="server" name="cb1" AutoPostBack="false" />
                            <asp:Label ID="lblContactID" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem, "CT_ContactID")%>'></asp:Label>
                        </td>
                        <td align="center" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_Name")%>
                        </td>
                        <td align="center" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_Phone")%>
                        </td>
                        <td align="left" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_Mobile")%>
                        </td>
                        <td align="center" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_QQ")%>
                        </td>
                        <td align="center" valign="middle">
                            <asp:Label ID="lblCompany" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Length > 20 ?  DataBinder.Eval(Container.DataItem, "CT_Company").ToString().Substring(0, 17) + "...": DataBinder.Eval(Container.DataItem, "CT_Company").ToString()%>'
                                ToolTip='<%#DataBinder.Eval(Container.DataItem, "CT_Company")%>'></asp:Label>
                        </td>
                        <td align="center" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_Department")%>
                        </td>
                        <td align="center" valign="middle">
                            <%#DataBinder.Eval(Container.DataItem, "CT_Duty")%>
                        </td>
                        <td align="center" valign="middle">
                            <asp:Label ID="lblGroup" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CG_ContactGroupID_FK")%>'></asp:Label>
                        </td>
                        <td width="70" align="center" valign="middle">
                            <asp:LinkButton ID="lblDetails" class="yellow12_link" runat="server" CommandName="Details"
                                CommandArgument='<%# Eval("CT_ContactID")%>' Text='查看' CausesValidation="false"></asp:LinkButton>
                            <asp:LinkButton ID="lbtnEdit" class="yellow12_link" runat="server" CommandName="Edit"
                                CommandArgument='<%# Eval("CT_ContactID")%>' Text='修改' CausesValidation="false"></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tr>
                        <td colspan="7">
                            <asp:Label ID="lblEmpty" Text="对不起，未查询到记录。" ForeColor="Red" runat="server" Visible='<%#Repeater1.Items.Count <= 0%>'></asp:Label>
                        </td>
                    </tr>
                </FooterTemplate>
            </asp:Repeater>
        </table>
        <!--分页-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" UrlPaging="false"
                        AlwaysShow="true" CustomInfoHTML="<span style:'height:18px;'></span><br/>共%PageCount%页 %RecordCount%条记录"
                        ShowCustomInfoSection="Left" FirstPageText="首页" PrevPageText="前一页" NextPageText="下一页"
                        LastPageText="末页" PageIndexBoxType="TextBox" ShowPageIndexBox="Always" TextBeforePageIndexBox="跳转到: "
                        SubmitButtonText="" SubmitButtonStyle="width:30px;height:21px;vertical-align:bottom;border:0px;background:url(../../../Images/3G/GO.gif) no-repeat;"
                        HorizontalAlign="right" PageSize="10" OnPageChanged="AspNetPager1_PageChanged"
                        EnableTheming="true">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
    </div>
    <div class="search_bottom_list">
        <div class="search_bottomleft_list">
        </div>
        <div class="search_bottombg_list">
        </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    <!--弹出层-->
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender3" runat="server" TargetControlID="LinkButton1"
        PopupControlID="appease_Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="appease_Panel2" 
            CancelControlID="btnCloseAll">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="appease_Panel1" runat="server" Style="display: none; width: 550px;
        vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="appease_Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    详细信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="appease_Panel3" runat="server">
                    <table border="1" runat="server" id="tableTS" cellpadding="1" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td align="right">
                                姓名：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblName" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                电话：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblPhone" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                手机号码：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblMobile" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                电子邮箱：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblEmail" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                QQ号码：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblQQ" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                地址：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblAddress" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                邮编：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblPostCode" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                单位：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblCompany" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                单位地址：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblCompanyAddress" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                部门：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblDepartment" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                职务：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblDuty" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                隶属通讯组：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:Label ID="lblContactGroup" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link" colspan="2">
                                <asp:Button ID="btnConfirm" runat="server" ToolTip="确定" />
                                <asp:Button ID="btnSend" runat="server" ToolTip="发送短信" OnClick="btnSend_Click"/>
                                <asp:Button ID="CancleButton" runat="server" Text="Cancle" Visible="false" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    
     <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton2"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" Style="display: none; width: 26%;
        vertical-align: middle;">
        <div class="attention_delete">
            <asp:Panel ID="Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid_delete">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    提示信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll2" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="Panel3" runat="server">
                    <table border="1" runat="server" id="table2" cellpadding="5" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td style="text-align: Center">
                                <asp:Label ID="lblTS" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link">
                                
                                <asp:Button ID="btnConfirm2" runat="server" ToolTip="确定" OnClick="btnConfirm2_Click"/>
                                <asp:Button ID="btnBack2" runat="server" style="display:none;"/>
                                <asp:Button ID="btnCancel" runat="server" Visible="false"/>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <input type="hidden" value="" runat="server" id="hihDelete"/>
    <asp:LinkButton ID="LinkButton1" runat="server" Visible="true" OnClick="LinkButton1_Click"></asp:LinkButton>
    <asp:LinkButton ID="LinkButton2" runat="server" Visible="true" OnClick="LinkButton2_Click"></asp:LinkButton>
    
<%--      </ContentTemplate>
    </asp:UpdatePanel>--%>
    </form>
</body>
</html>
